//1ji
import Index from "../views/Index"
import Login from "../views/Login"

//2级
import Home from '../views/Main/Home'
import Message from '../views/Main/Message'
import Classify from '../views/Main/Classify'
import My from '../views/Main/My';
import Detail from '../views/Main/Detail';
import MyDetail from '../views/Main/MyDetail';
import MyPhone from '../views/Main/MyPhone';
import Search from "../views/Main/Search"
import Head from "../views/Main/Head"
import MyName from "../views/Main/MyName"
import SearchDetail from "../views/Main/SearchDetail"
import { MyRouter } from "../utils/interface"
import SearchResult from "../views/Main/SearchResult"


let routes: MyRouter[] = [
    {
        path: '/index',
        component: Index,
        children: [
            {
                path: "/index/home",
                component: Home
            },
            {
                path: "/index/search",
                component: Search
            },
            {
                path: "/index/searchResult",
                component: SearchResult
            },
            {
                path: "/index/message",
                component: Message
            },
            {
                path: "/index/my",
                component: My
            },
            {
                path: "/index/classify",
                component: Classify
            },
            {
                path: "/index/myDetail",
                component: MyDetail,
            },
            {
                path: "/index/searchDetail",
                component: SearchDetail,
            },
            {
                path: "/index/head",
                component: Head,
            },
            {
                path: "/index/myPhone",
                component: MyPhone,
            },
            {
                path: "/index/myName",
                component: MyName,
            },
            {
                path: "/index",
                redirect: "/index/home"
            },
        ]
    },
    {
        path: '/detail',
        component: Detail,
    },
    {
        path: "/login",
        component: Login
    },
    {
        path: "/",
        redirect: "/index"
    }
]
export default routes